import request from "@/utils/request";

//获取反馈列表
export const getFeedbackList = ( params ) => {
    return request.get('/feedbacks/list',{ params })
}

//获取管理员反馈列表
export const getAdminFeedbackList = ( params ) => {
    return request.get('/feedbacks/admin', { params })
}

//获取用户反馈列表
export const getUserFeedbackList = ({ params }) => {
    return request.get('/feedbacks/my', { params })
}

//获取统计反馈信息
export const getFeedbackInfo = () => {
    return request.get('/feedbacks/stats')
}

//提交反馈
export const submitFeedback = ( data ) => {
    return request.post('/feedbacks/submit',{
        data
    })
}

//回复反馈
export const replyFeedback = ( feedbackId, reply) => {
    return request.post('/feedbacks/reply', {
        params: {
            feedbackId,
            reply
        }
    })
    }